import numpy as np


def selectionsort(arrayo, n):
    arr = list()
    result = list()
    arr = arrayo

    for i in range(n):

        minindex = i
        j = i + 1
        for j in range(n):
            if arr[j] < arr[minindex]:
                minindex = j
                arr[i], arr[minindex] = arr[minindex], arr[i]
                print(arr)
    return arr


if __name__ == '__main__':
    array1 = np.array([10, 9, 8, 7, 6, 5, 4, 3, 2, 1])
    arr2 = selectionsort(array1, 10)
    print(arr2)